package models;

import java.util.*;

import javax.persistence.*;

import play.db.jpa.*;

@Entity
public class Plan extends Model {

	String description;
	double status;
	ArrayList<String> requirements;
	Date startDate;
	Date endDate;
	@OneToMany(mappedBy = "plan", cascade = CascadeType.ALL)
	List<ActionItem> actionItems;
	@ManyToOne
	Idea idea;
	@ManyToOne
	User creator;

	public Plan(String description, double status, Date startDate,
			Date endDate, ArrayList<String> requirements, Idea idea,
			User creator) {
		this.description = description;
		this.status = status;
		this.requirements = requirements;
		this.startDate = startDate;
		this.endDate = endDate;
		this.idea = idea;
		this.creator = creator;
		this.actionItems = new ArrayList<ActionItem>();
	}
}
